  //ajax
    var url =zhuce;
    $(".btn").click(function(){
          let username = $(".tex1").val()
          let password = $(".tex1").val()
      $.ajax({
        type:"get",
        url:url,  
        data:{
          username,
          password
            }
      }).then(function(res){
        console.log(res)
        alert(res.msg);
        if(res.msg=="注册成功"){
          location.href="登录.html"
        }
      })
    })

  
    $(".btn1").click(function(){ 
       console.log($(".tex1").val())
      if($(".tex1").val()){
            alert("点击确定完成注册")
            var url =zhuce;
         
                  let username = $(".tex1").val()
                  let password = $(".tex1").val()
              $.ajax({
                type:"get",
                url:url,  
                data:{
                  username,
                  password
                    }
              }).then(function(res){
                console.log(res)
                alert(res.msg);
                if(res.msg=="注册成功"){
                  location.href="登录.html"
                }
              })
          





      }else{
         alert("账号不能为空")
      }

  

    })








   

  






















